package com.neusoft.ch6.demo1;

public class Animal {
	// 名称
	private String name;
	private double age;
	private String sex;

	/**
	 * 动物说话的行为
	 */
	public void speak() {
		System.out.println("animal speak...");
	}

	/**
	 * 动物行走的行为
	 */
	public void walk() {
		System.out.println("animal walk...");
	}

	/**
	 * 动物饮食的行为
	 */
	public void eat() {
		System.out.println("animal eat...");
	}
	
	/**
	 * 动物睡觉行为
	 */
	public void sleep() {
		System.out.println("animal sleep...");
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getAge() {
		return age;
	}

	public void setAge(double age) {
		this.age = age;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

}
